package com.simple.simple_view.domain.enums;

import lombok.Getter;

/*
 *@description: TODO
 *@author: hisen
 *@Time: 2023/10/26  16:34
 */
@Getter
public enum AppHttpCodeEnum {
    // 成功
    SUCCESS(200,"操作成功"),
    // 登录
    NEED_LOGIN(401,"需要登录后操作"),
    SYSTEM_ERROR(500,"出现错误"),
    USERNAME_EXIST(501,"用户名已存在"),
    USER_UPDATE_ERROR(502,"用户信息修改失败" ),
    USERINFO_STATUS_NOT_NULL(503,"用户信息状态不能为空" ),
    USERNAME_NOT_NULL(509,"用户名不能为空"),
    PASSWORD_NOT_NULL(510,"密码不能为空"),
    REQUIRE_USERNAME(504, "必需填写用户名"),
    LOGIN_ERROR(505,"用户名或密码错误"),
    CONTENT_NOT_NULL(506,"评论内容不能为空"),
    FILE_TYPE_ERROR(507,"仅支持jpg或png图片"),
    FTP_CLIENT_NOT_FOUND(508,"ftp客户端创建失败" ),
    USER_ID_NOT_NULL(511,"用户id不能为空" ),
    VIDEO_TEXT_NOT_NULL(512,"视频标题不能为空" ),
    VIDEO_CATEGORY_NOT_NULL(512,"视频分类不能为空" ),
    VIDEO_NOT_NULL(512,"视频不能为空" ),
    HOT_TYPE_NOT_NULL(513, "榜单类型不能为空"),
    HOT_TYPE_ERROR(514, "榜单类型错误"),
    VIDEO_ID_NOT_NULL(515, "视频id不能为空"),
    LIKE_OPERATION_NOT_NULL(516, "点赞操作不能为空"),
    BY_USER_ID_NOT_NULL(517, "视频所属用户不能为空"),
    COMMENT_CONTENT_ERROR(518, "评论内容错误"),
    ;
    final int code;
    final String msg;

    AppHttpCodeEnum(int code, String errorMessage){
        this.code = code;
        this.msg = errorMessage;
    }

}
